* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #0e1b28;
    line-height: 1.6;
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin: 30px 0;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #4a90e2;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.header p {
    color: #ccc;
}

/* Page Header */
.page-header {
    margin: 20px 0;
    padding: 15px;
    background: #1a2c40;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-header h2 {
    color: #4a90e2;
    font-size: 1.8em;
    margin-bottom: 5px;
}

.page-header p {
    color: #aaa;
}

/* Navigation */
.nav {
    background: #1a2c40;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.nav ul {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 8px 12px;
    border-radius: 5px;
}

.nav a:hover {
    color: #4a90e2;
    background-color: rgba(74, 144, 226, 0.1);
}

.nav a.active {
    color: #4a90e2;
    border-bottom: 2px solid #4a90e2;
}

/* Filter Bar */
.filter-bar {
    background: #1a2c40;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    color: #ccc;
    font-weight: 500;
}

.filter-group select,
.filter-group input[type="text"] {
    background: #0e1b28;
    color: #e0e0e0;
    border: 1px solid #334155;
    border-radius: 5px;
    padding: 8px 12px;
    outline: none;
    width: 120px;
}

.btn-filter {
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-filter:hover {
    background: #3a78c0;
}

/* Table Container */
.table-container {
    overflow-x: auto;
    background: #1a2c40;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    font-size: 14px;
    text-align: left;
}

.data-table thead th {
    background-color: #112235;
    color: #4a90e2;
    padding: 12px 15px;
    font-weight: 600;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 10px 15px;
    border-bottom: 1px solid #334155;
    vertical-align: middle;
}

.data-table tr:nth-child(even) {
    background-color: #112235;
}

.data-table tr:hover {
    background-color: rgba(74, 144, 226, 0.1);
}

/* Column widths and alignment */
.data-table td:nth-child(1), .data-table th:nth-child(1) { width: 60px; }   /* 排名 */
.data-table td:nth-child(2), .data-table th:nth-child(2) { min-width: 180px; } /* 饰品名称 */
.data-table td:nth-child(3), .data-table th:nth-child(3) { min-width: 120px; text-align: right; } /* 当前价格 */
.data-table td:nth-child(4), .data-table th:nth-child(4) { min-width: 120px; text-align: right; } /* 跌值 */
.data-table td:nth-child(5), .data-table th:nth-child(5) { min-width: 120px; text-align: right; } /* 跌幅 */

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .nav ul {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select,
    .filter-group input[type="text"] {
        width: 100%;
    }

    .btn-filter {
        width: 100%;
    }

    .data-table, .table-container {
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody td {
        display: block;
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .data-table tbody td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: bold;
        color: #aaa;
        white-space: nowrap;
    }

    .data-table tbody tr {
        display: block;
        margin-bottom: 20px;
        background: #1a2c40;
        border-radius: 8px;
        padding: 10px;
    }
}

/* Price and Change Styling */
.price {
    color: #4a90e2;
    font-weight: 600;
}

.change {
    text-align: right;
    font-weight: 600;
}

.up {
    color: #2ecc71;
}

.down {
    color: #e74c3c;
}

.rank-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #334155;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
    font-weight: 600;
}

.rank-badge.top3 {
    background: #4a90e2;
}

/* Footer */
.footer {
    margin-top: 50px;
    padding: 20px;
    text-align: center;
    color: #ccc;
    font-size: 0.9em;
    border-top: 1px solid #333;
}
